package com.sharemarking.wa.platform.controller;

import com.sharemarking.wa.common.ResponseParams;
import com.sharemarking.wa.platform.service.OrderDriverService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author dxy
 */
@RestController
@RequestMapping(value = "orderDriver")
public class OrderDriverController {
    @Autowired
    OrderDriverService orderDriverService;


    /**
     * 确认任务
     *
     * @return
     * @throws Exception
     */
    @RequestMapping("confirmOrder")
    public ResponseParams<?> confirmOrder() throws Exception {
        return orderDriverService.confirmOrder();
    }

    /**
     * 获取车辆列表
     *
     * @return
     * @throws Exception
     */
    @RequestMapping("getCarList")
    public ResponseParams<?> getCarList() throws Exception {
        return orderDriverService.getCarList();
    }


    /**
     * 送单
     *
     * @return
     * @throws Exception
     */
    @RequestMapping("deliveryOrder")
    public ResponseParams<?> deliveryOrder() throws Exception {
        return orderDriverService.deliveryOrder();
    }


    /**
     * 新增或编辑过磅重量和过磅图片
     *
     * @return
     * @throws Exception
     */
    @RequestMapping("addOrEditDelivery")
    public ResponseParams<?> addOrEditDelivery() throws Exception {
        return orderDriverService.addOrEditDelivery();
    }


    /**
     * 获取废品过磅重量和过磅图片
     *
     * @return
     * @throws Exception
     */
    @RequestMapping("getDeliveryInfo")
    public ResponseParams<?> getDeliveryInfo() throws Exception {
        return orderDriverService.getDeliveryInfo();
    }

}
